<!DOCTYPE html>
<html>
	<head>
		<title><?php echo OC_TITLE; ?></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="<?= css_theme('bootstrap.css'); ?>" rel="stylesheet" media="screen">
		<link rel="stylesheet" type="text/css" href="<?= css_theme('daterange.css'); ?>">
		<link href="<?= css_theme('main.css'); ?>" rel="stylesheet" media="screen">
		<link href="<?= css_theme('datepicker/datepicker.css'); ?>" rel="stylesheet">
		<link href="<?= font_theme('font-awesome.css'); ?>" rel="stylesheet">
		<link href="<?= js_theme('select2/select2.css'); ?>" rel="stylesheet">
		<link href="<?= js_theme('select2/select2-bootstrap.css'); ?>" rel="stylesheet">
		<link href="<?= js_theme('summernote/summernote.css'); ?>" rel="stylesheet">
		<link href="<?= js_theme('summernote/summernote-bs3.css'); ?>" rel="stylesheet">
		<?php
			$old_source_top = isset($source_top) ? $source_top : array();
			$new_source_top = array();
			$source_top     = array_merge($new_source_top, $old_source_top);

			if (isset($source_top) && count($source_top) > 0)
			{
				foreach ($source_top as $k)
				{
					echo $k."\n";
				}
			}
		?>
		<!--[if IE 7]>
			<link rel="stylesheet" href="fonts/font-awesome.css">
		<![endif]-->
		<!-- HTML5 shiv and Respond.js IE8 support of HTML5 elements and media queries -->
		<!--[if lt IE 9]>
			<script src="js/html5shiv.js"></script>
			<script src="js/respond.min.js"></script>
		<![endif]-->

	</head>
	<body>
		<div class="container">
			<!-- Top bar start -->
			<div class="top-bar">
				<div class="logo">
					<sup><i class="icon-cogs"></i></sup>
				</div>

				<!-- Icon nav start -->
				<ul id="icon-nav">
					<li>
						<a href="#">
							<i class="icon-bell"></i>
							<span class="count-label"></span>
						</a>
					</li>
					<li>
						<a href="#">
							<i class="icon-comment-alt"></i>
							<span class="count-label count-lb-yellow"></span>
						</a>
					</li>
					<li>
						<a href="#">
							<i class="icon-envelope-alt"></i>
							<span class="count-label count-lb-green"></span>
						</a>
					</li>
				</ul>
				<!-- Icon nav end -->

				<!-- Search bar start -->
				<div class="custom-search hidden-xs">
					<input id="omnisearch" type="text" class="search-query" placeholder="Keywords" autocomplete="off">
					<i class="icon-search-light"></i>
				</div>
			</div>
			<!-- Top bar end -->

			<!-- Header start -->
			<header class="navbar" role="navigation">
				<div class="navbar-header">
					<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a href="#" class="navbar-brand">&nbsp;</a>
				</div>
				<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">				
					<ul class="nav navbar-nav">
						<li class="<?= (isset($nav) && $nav == 'dashboard') ? 'active' : ''; ?>"><?php echo anchor('dashboard', 'Dashboard'); ?></li>
						<li class="dropdown <?= (isset($nav) && $nav == 'products') ? 'active' : ''; ?>" >
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">Products<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo anchor('products', 'Products'); ?></li>
								<li><?php echo anchor('products/categories', 'Categories'); ?></li>
							</ul>
						</li>
						<li class="dropdown <?= (isset($nav) && $nav == 'webcontent') ? 'active' : ''; ?>" >
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo anchor('recipes', 'Recipes'); ?></li>
								<li><?php echo anchor('recipes/categories', 'Categories Recipe'); ?></li>
								<li><?php echo anchor('articles', 'Articles'); ?></li>
								<li><?php echo anchor('articles/categories', 'Categories Article'); ?></li>
								<li><?php echo anchor('events', 'Events'); ?></li>
								<li><?php echo anchor('banners', 'Banners'); ?></li>
							</ul>
						</li>
						<li class="dropdown <?= (isset($nav) && $nav == 'sms') ? 'active' : ''; ?>" >
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">SMS<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo anchor('sms', 'Contact Handphone'); ?></li>
								<li><?php echo anchor('sms/send_sms', 'Send SMS'); ?></li>
							</ul>
						</li>

						<li class="dropdown <?= (isset($nav) && $nav == 'widget') ? 'active' : ''; ?>" >
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">Widget<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo anchor('widget', 'Widget'); ?></li>
								<li><?php echo anchor('widget/categories', 'Categories Widget'); ?></li>
							</ul>
						</li>
						
						<li class="dropdown <?= (isset($nav) && $nav == 'comment') ? 'active' : ''; ?>" >
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">Comments<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo anchor('comments/com_articles', 'Comm. Articles'); ?></li>
								<li><?php echo anchor('comments/com_events', 'Comm. Events'); ?></li>
								<li><?php echo anchor('comments/com_recipes', 'Comm. Recipes'); ?></li>
							</ul>
						</li>

						<?php $group = user('groups'); if($group[0]==1): ?>
						<li class="dropdown <?= (isset($nav) && $nav == 'settings') ? 'active' : ''; ?>">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">Settings <b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><?php echo anchor('role_module', 'Role Modules'); ?></li>
								<li><?php echo anchor('menus', 'Menu'); ?></li>
								<li><?php echo anchor('users', 'User'); ?></li>
							</ul>
						</li>
						<?php endif; ?>
					</ul>
					
					<!-- Mini navigation start -->
					<ul class="nav navbar-nav navbar-right hidden-sm hidden-xs">
						<li><a href="#"><i class="glyphicon glyphicon-user"></i> <?= user('fullname') ?></a></li>
						<li><a href="<?php echo site_url('auth/logout'); ?>">Logout</a></li>
					</ul>
					<!-- Mini navigation end -->
				</nav>
			</header>
			<!-- Header end -->

			<!-- Page title Start -->
			<div class="page-title">
				<div class="row ">
					<div class="col-md-12 col-sm-12 col-xs-12">

						<h2 id="pagetitle" data-title="<?= isset($pagetitle) ? $pagetitle : 'Dashboard'; ?>">
							<?= isset($pagetitle) ? $pagetitle : 'Dashboard'; ?>
						</h2>
					</div>
				</div>
			</div>
			<!-- Page title end -->

			<!-- content -->
			<?php echo $this->content(); ?>
			<!-- content end -->

			<div class="row">
				<div class="col-sm-12">
					<div class="page-footer">
						<span>&copy; Copyright 2014 - <a href="http://oemahcode.com" target="_blank">Oemahcode</a></span>
					</div>
				</div>
			</div>

		</div>
		<!-- jQuery (necessary for Bootstrap's JavaScript plugins) 
		<script src="js/jquery.js"></script>-->
		<!-- Include all compiled plugins (below), or include individual files as needed -->
		<script src="<?= js_theme('jquery.js'); ?>"></script>
		<script>
			function siteURL(uri) {
				return '<?= site_url("'+uri+'"); ?>';
			}
		</script>
		<?php
			$old_source_bot	= isset($source_bot) ? $source_bot : array();
			$new_source_bot	= array();
			$source_bot = array_merge($new_source_bot, $old_source_bot);

			if (isset($source_bot) && count($source_bot) > 0)
			{
				foreach ($source_bot as $k)
				{
					echo $k."\n";
				}
			}
		?>

		<script src="<?= js_theme('bootstrap.min.js'); ?>"></script>
		<script src="<?= js_theme('select2/select2.js'); ?>"></script>
		<script src="<?= js_theme('summernote/summernote.js'); ?>"></script>

		<?php if (isset($jeasyui) && $jeasyui == TRUE) { ?>
		<link rel="stylesheet" type="text/css" href="<?= js_theme('jeasyui/themes/bootstrap/easyui.css'); ?>">
		<link rel="stylesheet" type="text/css" href="<?= css_theme('jeasyui-custom.css'); ?>">
		<link rel="stylesheet" type="text/css" href="<?= js_theme('jeasyui/themes/icon.css'); ?>">
		<!-- script type="text/javascript" src="<?= js_theme('main.js'); ?>"></script-->
		<!--script type="text/javascript" src="js/jeasyui/jquery.min.js"></script-->
		<script type="text/javascript" src="<?= js_theme('jeasyui/jquery.easyui.min.js'); ?>"></script>
		<script type="text/javascript" src="<?= js_theme('jeasyui/datagrid-groupview.js'); ?>"></script>
		<?php } ?>



		<!-- Flot Charts 
		<script src="js/flot/jquery.flot.js"></script>
		<script src="js/flot/jquery.flot.time.js"></script>
		<script src="js/flot/jquery.flot.selection.js"></script>
		<script src="js/flot/jquery.flot.resize.js"></script>
		<script src="js/flot/jquery.flot.tooltip.js"></script>
		<script src="js/flot/flot.excanvas.min.js"></script>
		-->

		<!-- Custom flot JS 
		<script src="js/flot/custom/combine-chart.js"></script>
		-->
		<!-- Sparkline graphs 
		<script src="js/sparkline.js"></script>
		-->
		<!-- Tyny Scrollbar 
		<script src="js/tiny-scrollbar.js"></script>-->

		<!-- Date Range 
		<script src="js/daterange/moment.js"></script>
		<script src="js/daterange/daterangepicker.js"></script>-->

		<!-- Custom JS 
		<script src="js/custom.js"></script>
		<script src="js/custom-index.js"></script>
		-->

	</body>
</html>